﻿
namespace CustomLogging
{
    /// <summary>
    /// Server side method that is called from the Client to write client side
    /// messages to the server log file. 
    /// </summary>
    public static class ServerLogger
    {
        [IdeaBlade.EntityModel.AllowRpcAttribute]
        public static object Log(System.Security.Principal.IPrincipal principal,
                                  IdeaBlade.EntityModel.EntityManager serverEntityManager,
                                  params object[] args)
        {
            if (args.Length == 0) return null;
            var msg = string.Format("Client message: '{0}'", args[0]);
            IdeaBlade.Core.TraceFns.WriteLine(msg);
            return null;
        }
    }
}
